#ifndef _RICHTEXTBULLETSPAGE_H_
#define _RICHTEXTBULLETSPAGE_H_

#include "wx/wxprec.h"
#include "wx/spinbutt.h"
#include "wx/spinctrl.h"
#include "wx/statline.h"
#include "wx/richtext/richtextbuffer.h"
#include "wx/richtext/richtextctrl.h"
#include "wx/richtext/richtextformatdlg.h"
#include "wx/richtext/richtextsymboldlg.h"


class wxSpinCtrl;
class wxRichTextCtrl;

#define SYMBOL_WXRICHTEXTBULLETSPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
#define SYMBOL_WXRICHTEXTBULLETSPAGE_TITLE _("wxRichTextBulletsPage")
#define SYMBOL_WXRICHTEXTBULLETSPAGE_IDNAME ID_RICHTEXTBULLETSPAGE
#define SYMBOL_WXRICHTEXTBULLETSPAGE_SIZE wxSize(400, 300)
#define SYMBOL_WXRICHTEXTBULLETSPAGE_POSITION wxDefaultPosition

class wxRichTextBulletsPage : public wxPanel {
    DECLARE_DYNAMIC_CLASS( wxRichTextBulletsPage )
    DECLARE_EVENT_TABLE()
  public:
    wxRichTextBulletsPage( );
    wxRichTextBulletsPage( wxWindow * parent, wxWindowID id = wxID_ANY,
                           const wxPoint& pos = SYMBOL_WXRICHTEXTBULLETSPAGE_POSITION,
                           const wxSize& size = SYMBOL_WXRICHTEXTBULLETSPAGE_SIZE,
                           long style = SYMBOL_WXRICHTEXTBULLETSPAGE_STYLE );
    bool Create( wxWindow * parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTBULLETSPAGE_POSITION,
                 const wxSize& size = SYMBOL_WXRICHTEXTBULLETSPAGE_SIZE, long style = SYMBOL_WXRICHTEXTBULLETSPAGE_STYLE );
    void Init();
    void CreateControls();
    void UpdatePreview();
    virtual bool TransferDataFromWindow();
    virtual bool TransferDataToWindow();
    wxTextAttrEx * GetAttributes();
    void OnSymbolUpdate( wxUpdateUIEvent& event );
    void OnNumberUpdate( wxUpdateUIEvent& event );
    void OnStandardBulletUpdate( wxUpdateUIEvent& event );
    void OnStylelistboxSelected( wxCommandEvent& event );
    void OnPeriodctrlClick( wxCommandEvent& event );
    void OnPeriodctrlUpdate( wxUpdateUIEvent& event );
    void OnParenthesesctrlClick( wxCommandEvent& event );
    void OnParenthesesctrlUpdate( wxUpdateUIEvent& event );
    void OnRightParenthesisCtrlClick( wxCommandEvent& event );
    void OnRightParenthesisCtrlUpdate( wxUpdateUIEvent& event );
    void OnBulletAlignmentCtrlSelected( wxCommandEvent& event );
    void OnSymbolstaticUpdate( wxUpdateUIEvent& event );
    void OnSymbolctrlSelected( wxCommandEvent& event );
    void OnSymbolctrlUpdated( wxCommandEvent& event );
    void OnSymbolctrlUpdate( wxUpdateUIEvent& event );
    void OnChooseSymbolClick( wxCommandEvent& event );
    void OnChooseSymbolUpdate( wxUpdateUIEvent& event );
    void OnSymbolfontctrlSelected( wxCommandEvent& event );
    void OnSymbolfontctrlUpdated( wxCommandEvent& event );
    void OnSymbolfontctrlUIUpdate( wxUpdateUIEvent& event );
    void OnNamestaticUpdate( wxUpdateUIEvent& event );
    void OnNamectrlSelected( wxCommandEvent& event );
    void OnNamectrlUpdated( wxCommandEvent& event );
    void OnNamectrlUIUpdate( wxUpdateUIEvent& event );
    void OnNumberstaticUpdate( wxUpdateUIEvent& event );
    void OnNumberctrlUpdated( wxSpinEvent& event );
    void OnNumberctrlUp( wxSpinEvent& event );
    void OnNumberctrlDown( wxSpinEvent& event );
    void OnNumberctrlTextUpdated( wxCommandEvent& event );
    void OnNumberctrlUpdate( wxUpdateUIEvent& event );
    wxBitmap GetBitmapResource( const wxString& name );
    wxIcon GetIconResource( const wxString& name );
    static bool ShowToolTips();
    wxListBox* m_styleListBox;
    wxCheckBox* m_periodCtrl;
    wxCheckBox* m_parenthesesCtrl;
    wxCheckBox* m_rightParenthesisCtrl;
    wxComboBox* m_bulletAlignmentCtrl;
    wxComboBox* m_symbolCtrl;
    wxComboBox* m_symbolFontCtrl;
    wxComboBox* m_bulletNameCtrl;
    wxSpinCtrl* m_numberCtrl;
    wxRichTextCtrl* m_previewCtrl;
    enum {
      ID_RICHTEXTBULLETSPAGE = 10300,
      ID_RICHTEXTBULLETSPAGE_STYLELISTBOX = 10305,
      ID_RICHTEXTBULLETSPAGE_PERIODCTRL = 10313,
      ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL = 10311,
      ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL = 10306,
      ID_RICHTEXTBULLETSPAGE_BULLETALIGNMENTCTRL = 10315,
      ID_RICHTEXTBULLETSPAGE_SYMBOLSTATIC = 10301,
      ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL = 10307,
      ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL = 10308,
      ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL = 10309,
      ID_RICHTEXTBULLETSPAGE_NAMESTATIC = 10303,
      ID_RICHTEXTBULLETSPAGE_NAMECTRL = 10304,
      ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC = 10302,
      ID_RICHTEXTBULLETSPAGE_NUMBERCTRL = 10310,
      ID_RICHTEXTBULLETSPAGE_PREVIEW_CTRL = 10314
    };
    bool m_hasBulletStyle;
    bool m_hasBulletNumber;
    bool m_hasBulletSymbol;
    bool m_dontUpdate;
};

#endif
